<template>
  <el-menu
    class="banner-container"
    mode="horizontal"
    background-color="#285fce"
    active-text-color="#ffd04b"
    text-color="#fff"
    :style="{
      paddingLeft: p + 'vw',
      paddingRight: p + 'vw',
    }"
  >
    <div class="sub-container">
      <div class="title">
        <img :src="logo" alt="" />
        <span
          >国家工业互联网标识解析安全应急行业公共服务平台 <span>|</span>
          {{ subtitle }}</span
        >
      </div>
      <div class="main-page" @click="clickHandler">
        <span>首页</span>
        <i class="icon-arrow-right iconfont"></i>
      </div>
    </div>
  </el-menu>
</template>

<script>
import logo from "@/assets/data/exports/logo@1x.png";
import arrow from "@/assets/data/exports/fangxiangdown@1x.png";
export default {
  props: {
    p: {
      default: 6,
    },
    subtitle: {
      type: String,
      default: "欢迎登录",
    },
  },
  data() {
    return {
      logo,
      arrow,
    };
  },
  methods: {
    clickHandler() {
      location.hash = "/";
    },
  },
};
</script>

<style lang="scss" scoped>
@import url("//at.alicdn.com/t/c/font_4118001_w4h80sz1bi.css");
.banner-container {
  height: 70px;
  margin: 0;
  padding: 15px;
  color: white;
  font-weight: bold;
  font-size: 25px;
  border-bottom: none;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  // margin-bottom: 20px;
}
.sub-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
}

.title {
  overflow: hidden;
  img {
    width: 1.6em;
    vertical-align: -5px;
    margin-right: 0.5em;
  }
  span {
    span {
      vertical-align: 2px;
    }
  }
}
.main-page {
  flex: 0 0 auto;
  cursor: pointer;
  i {
    font-size: 22px;
  }
}
</style>
